using BruteForce.NewManagers;
using BruteForce.Screens.PlayingScreen.Panels;
using BruteForce.UserInterface.Abstracts;
using Microsoft.Xna.Framework;

namespace BruteForce.Screens.CreateNewCharacterScreen
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class CreateNewCharacterScreen : AbstractScreen
    {
        public CreateNewCharacterScreen()
            : base("CreateNewCharacterScreen", false, BFGame.Instance.GraphicsDevice.Viewport.Bounds)
        {
            AbstractPanel createNewCharacterPanel = new CreateNewCharacterPanel();
            AbstractPanel playerStatusPanel = new PlayerStatusPanel(false);
            AddPanel(createNewCharacterPanel, PanelLocation.Center, -1);
            AddPanel(playerStatusPanel, PanelLocation.Bottom, 150);
        }


        public void Update(GameTime gameTime)
        {
            foreach (AbstractPanel panel in Panels)
            {
                if (InputManager.Instance.IsMouseClickedOn(panel.Bounds))
                {
                    panel.Update(gameTime);
                }
            }
        }
    }
}